﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace map.member
{
    public partial class WebForm4 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //是否申请及申请进度
            RuleCode.Table.cbuser x = RuleCode.Table.cbuser.Find(" cbuserid = '" +AliApi.appUserId+"'" );
            if (x.BokerStatus == RuleCode.Enum.BrokerStatus.Common)
            {
                HyperLink1.Text = "您还没有申请经纪人，请点击此链接申请。";
                HyperLink1.Target = "member/brokerequire.aspx";
                this.content.Visible = false;
            }
            else
            {
                if (x.BokerStatus == RuleCode.Enum.BrokerStatus.Require)
                {
                    Label1.Text = "您的申请处于审核中，请耐心等待";
                    this.content.Visible = false;
                }
                else
                {
                    GridViewBind();
                }
            }

        }
        private void GridViewBind()
        {
            //NoYes=0,订阅有效
            RuleCode.Table.cbBroker x = RuleCode.Table.cbBroker.Find(" BrokerID = '" + AliApi.appUserId + "' and NoYes=1");
            this.GridView1.DataSource = x.MyTable;

            this.GridView1.DataBind();
        }
    }
}
